package com.hxzy.mapper.system;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hxzy.dto.system.SysDictDataDTO;
import com.hxzy.entity.system.SysDictData;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 数据字典明细
 */
@Mapper
public interface SysDictDataMapper extends BaseMapper<SysDictData> {

    /**
     * 查询所有正常数据
     * @return
     */
    List<SysDictData> findAll();

    List<SysDictData> search( @Param(value = "dto") SysDictDataDTO sysDictDataDTO);

    /**
     * 批量更新状态
     * @param dictIds
     * @param state
     * @return
     */
    int updateByState(@Param(value = "dictIds") Long[] dictIds, @Param("state") String state);

    /**
     * 根据id批量查询dictType的值
     * @param dictIds
     * @return
     */
    List<String> selectDictTypeByIds(@Param(value = "dictIds") Long[] dictIds);
}